package com.ruoyi.culture.service.feign;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.domain.SysUser;
import com.ruoyi.system.api.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "SysUserService", value = ServiceNameConstants.SYSTEM_SERVICE, url = "localhost:8080/system")
public interface SysUserService {

    @PostMapping("/user/register")
    R<Boolean> register(@RequestBody SysUser sysUser);

    @GetMapping("/user/info/username/")
    SysUser getId(@RequestParam("username") String username);

    @PutMapping("/user")
    AjaxResult edit(@Validated @RequestBody SysUser user);

}
